package stream;

import cn.hutool.core.collection.CollUtil;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class FlatMap {
    public static void main(String[] args) {
        List<List<Integer>> list = Stream.of(CollUtil.toList(1, 2, 3), CollUtil.toList(4, 5, 6)).collect(Collectors.toList());
        list.stream().flatMap(oneList -> oneList.stream()).forEach(System.out::println);
    }
}
